import os
import random
import xml.etree.ElementTree as ET

from utils.utils import get_classes

VOCdevkit_path  = 'J:\数据集\远距离拍摄\无压缩'
if __name__ == "__main__":
    xmlfilepath     = os.path.join(VOCdevkit_path, 'Annotations')
    print("xmlfilepath:" + xmlfilepath)
    xmlfiles        = os.listdir(xmlfilepath)

    imgfilepath     = os.path.join(VOCdevkit_path, 'JPEGImages')
    print("imgfilepath:" + imgfilepath)
    imgfiles        = os.listdir(imgfilepath)


    #查找文件
    for filename in imgfiles:
        shorName = os.path.splitext(filename)[0]
        xmlfilename = shorName + ".xml"
        if xmlfilename not in xmlfiles:
            print(filename)

        

    